/* AddAction.java
 * Author: liuex
 * 2007-12-19 ����03:11:30
 *
 * Note: 
 */
package lex.proxyverfier.actions;

import java.awt.Window;
import java.awt.event.ActionEvent;

import org.lex.net.proxy.ProxyServer;
import org.lex.net.proxy.ui.ProxyServerDialog;
import org.lex.swing.ActionBuilder;

import lex.proxyverfier.ProxyVerifier;

public class AddAction extends ActionBuilder
{
	public AddAction()
	{
		super();
		this.setName( "Add" );
	}

	@Override
	public void actionPerformed( ActionEvent e )
	{
		ProxyVerifier app = ProxyVerifier.getApplication();
		Window root = app.getRootWindow();
		ProxyServer ps = ProxyServerDialog.showAddDialog( root );
		if( null == ps )
			return;
		app.getProxyManager().put( ps );
	}
}
